from core.basic.skill import 技能
from core.basic.character import Character
from core.basic.skill import 主动技能, 被动技能


class 技能0(主动技能):
    名称 = 'RX-78追击者'
    所在等级 = 5
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [10, 168]
    data0 = [0, 667, 734, 802, 869, 936, 1003, 1071, 1140, 1207, 1275, 1343, 1410, 1477, 1546, 1613, 1680, 1749, 1817, 1884, 1952, 2020, 2087, 2155, 2222, 2290, 2359, 2426, 2494, 2561, 2629, 2696, 2763, 2831, 2898, 2967, 3035, 3102, 3169, 3237, 3305, 3372, 3440, 3509, 3576, 3643, 3712, 3779, 3846, 3915, 3982, 4049, 4117, 4186, 4253, 4320, 4389, 4456, 4523, 4590, 4658, 4726, 4793, 4862, 4929, 4996, 5065, 5132, 5199, 5266, 5336]
    hit0 = 1
    CD = 2.8
    TP成长 = 0.10
    TP上限 = 7


class 技能1(主动技能):
    名称 = 'Ez-8自爆者'
    所在等级 = 15
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [60, 504]
    data0 = [0, 2281, 2512, 2743, 2975, 3206, 3438, 3670, 3901, 4132, 4364, 4595, 4826, 5058, 5289, 5521, 5752, 5984, 6216, 6447, 6678, 6910, 7141, 7372, 7604, 7835, 8066, 8299, 8530, 8761, 8993, 9224, 9456, 9687, 9917, 10150, 10380, 10611, 10845, 11075, 11306, 11538, 11769, 12000, 12232, 12463, 12695, 12926, 13158, 13390, 13621, 13852, 14084, 14315, 14546, 14778, 15009, 15240, 15473, 15704, 15935, 16167, 16398, 16630, 16861, 17092, 17324, 17555, 17786, 18019, 18250]
    hit0 = 1
    CD = 7.5
    TP成长 = 0.10
    TP上限 = 7
    演出时间 = 5.5


class 技能2(被动技能):
    名称 = '机械引爆'
    所在等级 = 15
    等级上限 = 20
    基础等级 = 5
    是否主动 = 1
    关联技能 = ['RX-78追击者', 'Ez-8自爆者']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return 1.40


class 技能3(被动技能):
    名称 = '机械原理'
    所在等级 = 15
    等级上限 = 11
    学习间隔 = 3
    等级精通 = 1

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.085+0.015*self.等级, 5)


class 技能4(主动技能):
    名称 = 'G1科罗纳'
    所在等级 = 20
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [40, 420]
    关联技能 = ['G2旋雷者', 'G3捕食者']
    data0 = [0, 163, 183, 198, 214, 230, 248, 263, 281, 297, 313, 332, 348, 365, 381, 399, 416, 431, 448, 465, 480, 499, 517, 533, 548, 565, 583, 598, 615, 632, 650, 666, 682, 702, 718, 734, 750, 766, 782, 801, 818, 835, 852, 868, 884, 899, 918, 934, 952, 967, 984, 1003, 1018, 1036, 1052, 1070, 1085, 1103, 1119, 1136, 1153, 1170, 1187, 1203, 1219, 1236, 1253, 1269, 1289, 1306, 1320]
    hit0 = 1
    攻击间隔0 = 0.2
    TP成长 = 0.10
    TP上限 = 7
    CD = 20.0  # 召唤冷却
    输出时间 = 0

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.59+0.01*self.等级, 5)

    def 等效百分比(self, **argv):
        self.hit0 = self.输出时间 / self.攻击间隔0 * 1
        char = argv.get('char', {})
        # G1倍率 = char.get_skill_by_name("G1科罗纳").加成倍率("")
        G2倍率 = char.get_skill_by_name("G2旋雷者").加成倍率("")
        G3倍率 = char.get_skill_by_name("G3捕食者").加成倍率("")
        return super().等效百分比(**argv) / G2倍率 / G3倍率 *( G3倍率 + G2倍率 -1)

class 技能5(被动技能):
    名称 = '危机追击者'
    备注 = '期望'
    所在等级 = 20
    等级上限 = 20
    学习间隔 = 3
    等级精通 = 10
    关联技能 = ['RX-78追击者']

    data0 = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return 1.0+self.data0/1000


class 技能6(主动技能):
    名称 = 'G2旋雷者'
    所在等级 = 25
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [58, 609]
    关联技能 = ['G1科罗纳', 'G3捕食者','G1磁力弹']
    # 静电 近身
    data0 = [0, 82, 90, 99, 107, 116, 123, 132, 140, 149, 157, 165, 173, 182, 190, 197, 206, 215, 222, 231, 239, 248, 257, 264, 273, 281, 290, 297, 306, 314, 323, 330, 339, 347, 356, 363, 372, 380, 388, 397, 405, 413, 422, 430, 438, 446, 455, 464, 471, 480, 488, 497, 503, 513, 521, 529, 537, 546, 554, 563, 571, 579, 587, 596, 604, 612, 620, 629, 637, 644, 653]
    hit0 = 0
    攻击间隔0 = 1
    # 电波 远程
    data1 = [0, 817, 899, 982, 1064, 1148, 1230, 1314, 1396, 1479, 1561, 1645, 1727, 1811, 1892, 1976, 2057, 2142, 2223, 2307, 2389, 2472, 2555, 2639, 2720, 2804, 2886, 2970, 3053, 3135, 3218, 3299, 3384, 3465, 3549, 3631, 3714, 3798, 3880, 3962, 4046, 4127, 4212, 4293, 4377, 4459, 4542, 4624, 4708, 4790, 4874, 4955, 5039, 5121, 5205, 5287, 5370, 5453, 5537, 5619, 5702, 5784, 5867, 5950, 6033, 6116, 6198, 6281, 6362, 6447, 6528]
    hit1 = 4
    攻击间隔1 = 6

    CD = 1  # 技能本身没有CD

    输出时间 = 0

    形态 = ["远程", "近身"]

    def 形态变更(self, 形态, char: Character):
        if 形态 == '' and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "远程":
            self.hit0 = 0
            self.hit1 = self.输出时间 / self.攻击间隔1 * 4
        if 形态 == "近身":
            # 二觉被动
            self.hit0 = self.输出时间 / (self.攻击间隔0 / 1.05)
            self.hit1 = 0

    def 等效CD(self, **argv):
        return round(1.5, 1)

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.50+0.01*self.等级, 5)

    def 等效百分比(self, **argv):
        char = argv.get('char', {})
        G1倍率 = char.get_skill_by_name("G1科罗纳").加成倍率("")
        # G2倍率 = char.get_skill_by_name("G2旋雷者").加成倍率("")
        G3倍率 = char.get_skill_by_name("G3捕食者").加成倍率("")
        return super().等效百分比(**argv) / G1倍率 / G3倍率 *(G3倍率+G1倍率-1)

class 技能7(主动技能):
    名称 = '毒蛇炮'
    备注 = '满'
    所在等级 = 25
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [60, 504]
    data0 = [0, 99, 110, 121, 130, 141, 149, 161, 171, 181, 191, 201, 211, 221, 232, 242, 252, 263, 271, 281, 291, 303, 313, 322, 333, 343, 352, 363, 374, 384, 393, 404, 413, 425, 432, 444, 455, 464, 475, 484, 494, 505, 516, 525, 535, 544, 555, 566, 577, 586, 597, 605, 615, 626, 637, 648, 657, 667, 677, 688, 696, 708, 719, 728, 738, 747, 758, 768, 778, 789, 799]
    hit0 = 30
    CD = 3.5
    TP成长 = 0.10
    TP上限 = 7
    演出时间 = 5.5


class 技能8(被动技能):
    名称 = '电能转换'
    所在等级 = 25
    等级上限 = 20
    学习间隔 = 3
    等级精通 = 10
    关联技能 = ['毒蛇炮', '空战机械：狂风', '空投支援', '拦截机工厂', 'G0战争领主', 'HS12等离子体发生器', 'G4雷行者',
            'GSP猎鹰', '高压电磁场', '终结者：博尔特MX', '超时空光耀加农炮', 'G-X星尘天穹', 'RX-78追击者', 'Ez-8自爆者']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.10+0.02*self.等级, 5)


class 技能9(主动技能):
    名称 = 'G3捕食者'
    备注 = '秒伤'
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [77, 808]
    关联技能 = ['G1科罗纳', 'G2旋雷者','G1磁力弹']
    data0 = [0, 147, 162, 177, 191, 206, 221, 236, 251, 265, 280, 293, 309, 326, 340, 354, 369, 383, 397, 414, 428, 443, 457, 472, 487, 501, 518, 533, 547, 562, 576, 591, 606, 621, 636, 651, 665, 680, 695, 709, 725, 738, 753, 768, 782, 797, 810, 826, 841, 856, 871, 886, 900, 916, 931, 945, 961, 975, 990, 1005, 1020, 1034, 1049, 1064, 1079, 1093, 1108, 1124, 1138, 1153, 1169]
    hit0 = 4
    攻击间隔0 = 0.5
    CD = 0  # 技能本身没有CD
    输出时间 = 0

    def 等效CD(self, **argv):
        return round(0.5, 1)

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        if self.等级 <=12:
            return round(1.49+0.01*self.等级, 3)
        else:
            return round(1.37+0.02*self.等级, 3)

    def 等效百分比(self, **argv):
        self.hit0 = self.输出时间 / self.攻击间隔0 * 4
        char = argv.get('char', {})
        G1倍率 = char.get_skill_by_name("G1科罗纳").加成倍率("")
        G2倍率 = char.get_skill_by_name("G2旋雷者").加成倍率("")
        # G3倍率 = char.get_skill_by_name("G3捕食者").加成倍率("")
        return super().等效百分比(**argv) / G1倍率 / G2倍率 *(G2倍率+G1倍率-1)


class 技能10(主动技能):
    名称 = 'G1磁力弹'
    所在等级 = 30
    等级上限 = 1
    学习间隔 = 2
    等级精通 = 1
    MP = [70, 1600]
    data0 = [0, 163, 183, 198, 214, 230, 248, 263, 281, 297, 313, 332, 348, 365, 381, 399, 416, 431, 448, 465, 480, 499, 517, 533, 548, 565, 583, 598, 615, 632, 650, 666, 682, 702, 718, 734, 750, 766, 782, 801, 818, 835, 852, 868, 884, 899, 918, 934, 952, 967, 984, 1003, 1018, 1036, 1052, 1070, 1085, 1103, 1119, 1136, 1153, 1170, 1187, 1203, 1219, 1236, 1253, 1269, 1289, 1306, 1320]
    hit0 = 10
    CD = 15.0
    倍率 = 1.72

    def 等效百分比(self, **argv):
        char = argv.get('char', {})
        # G1倍率 = char.get_skill_by_name("G1科罗纳").加成倍率("")
        G2倍率 = char.get_skill_by_name("G2旋雷者").加成倍率("")
        G3倍率 = char.get_skill_by_name("G3捕食者").加成倍率("")
        return super().等效百分比(**argv) / G2倍率 / G3倍率 *( G3倍率 + G2倍率 - 1)

class 技能11(主动技能):
    名称 = '空战机械：狂风'
    备注 = '引爆'
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    # 机枪一轮
    data0 = [0, 813, 897, 979, 1060, 1144, 1226, 1308, 1391, 1473, 1556, 1638, 1721, 1804, 1886, 1968, 2052, 2134, 2214, 2297, 2381, 2463, 2546, 2626, 2711, 2793, 2876, 2958, 3040, 3123, 3206, 3289, 3370, 3451, 3534, 3619, 3700, 3783, 3864, 3948, 4031, 4113, 4196, 4278, 4360, 4443, 4526, 4607, 4689, 4772, 4855, 4938, 5019, 5103, 5185, 5268, 5350, 5433, 5515, 5598, 5678, 5762, 5845, 5926, 6011, 6092, 6175, 6256, 6340, 6423, 6505]
    hit0 = 3
    攻击间隔0 = 3

    # 导弹一轮
    data1 = [0, 367, 404, 441, 478, 514, 553, 590, 626, 664, 700, 738, 775, 812, 849, 885, 923, 961, 997, 1033, 1071, 1109, 1146, 1183, 1219, 1257, 1294, 1331, 1368, 1405, 1443, 1480, 1518, 1554, 1591, 1630, 1667, 1702, 1740, 1777, 1814, 1851, 1888, 1926, 1961, 2000, 2037, 2074, 2110, 2148, 2185, 2222, 2259, 2296, 2333, 2370, 2408, 2444, 2480, 2519, 2556, 2595, 2631, 2666, 2706, 2743, 2779, 2816, 2853, 2891, 2928]
    hit1 = 6
    攻击间隔1 = 3

    # 爆炸
    data2 = [0, 2928, 3223, 3521, 3817, 4114, 4412, 4709, 5006, 5302, 5600, 5896, 6195, 6491, 6787, 7084, 7383, 7678, 7974, 8272, 8569, 8866, 9162, 9458, 9758, 10055, 10351, 10647, 10945, 11241, 11539, 11837, 12132, 12429, 12725, 13023, 13319, 13616, 13914, 14212, 14507, 14804, 15102, 15399, 15696, 15993, 16288, 16586, 16884, 17179, 17476, 17774, 18070, 18368, 18664, 18962, 19259, 19556, 19851, 20150, 20447, 20744, 21039, 21337, 21633, 21930, 22227, 22524, 22822, 23118, 23416]
    hit2 = 1
    power2 = 1.4  # 引爆
    CD = 30.0  # 召唤CD
    TP成长 = 0.10
    TP上限 = 5
    装备护石 = 0
    是否有护石 = 1
    输出时间 = 0

    MP = [200, 1680]
    无色消耗 = 1

    形态 = ['续航', '爆炸']

    def 手搓CD(self):
        return 0

    def 装备护石(self, char):
        self.power0 = 0
        self.power1 = 0
        self.power2 *= 9.24 / 1.4

    def 形态变更(self, 形态, char: Character):
        if (形态 == '' or 形态 not in self.形态) and len(self.形态) > 0:
            形态 = self.形态[0]
        if "空战机械：狂风" in char.护石栏:
            形态 = "爆炸"
        if 形态 == "续航":
            self.hit0 = self.输出时间 / self.攻击间隔0 * 3
            self.hit1 = self.输出时间 / self.攻击间隔1 * 6
            self.hit2 = 0
        if 形态 == "爆炸":
            self.hit0 = 0
            self.hit1 = 0
            self.hit2 = 1

class 技能12(主动技能):
    名称 = '空投支援'
    备注 = '直接引爆'
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [0, 1312, 1446, 1579, 1711, 1846, 1979, 2112, 2245, 2379, 2513, 2643, 2778, 2912, 3043, 3178, 3310, 3445, 3576, 3709, 3844, 3978, 4110, 4243, 4377, 4508, 4643, 4776, 4909, 5041, 5175, 5310, 5441, 5574, 5708, 5841, 5974, 6108, 6242, 6375, 6505, 6641, 6774, 6904, 7041, 7171, 7306, 7437, 7572, 7706, 7836, 7972, 8103, 8238, 8371, 8503, 8638, 8771, 8904, 9037, 9170, 9302, 9436, 9570, 9703, 9836, 9969, 10104, 10234, 10369, 10501]
    hit0 = 20
    CD = 35
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    MP = [300, 2520]
    无色消耗 = 2

    def 装备护石(self, char):
        self.hit0 = 23
        self.倍率 *= 1.16
        self.CDR = 0.9


class 技能13(主动技能):
    名称 = '拦截机工厂'
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [0, 232, 257, 281, 302, 326, 349, 373, 396, 422, 446, 469, 492, 515, 539, 564, 587, 609, 634, 657, 680, 706, 729, 753, 774, 799, 822, 847, 869, 893, 916, 941, 964, 988, 1013, 1035, 1058, 1081, 1107, 1130, 1152, 1176, 1200, 1224, 1247, 1272, 1293, 1319, 1340, 1364, 1387, 1413, 1434, 1458, 1483, 1505, 1529, 1551, 1577, 1599, 1623, 1647, 1671, 1692, 1719, 1742, 1766, 1791, 1813, 1836, 1861]
    hit0 = 110
    data1 = [0, 1743, 1919, 2099, 2275, 2451, 2628, 2806, 2983, 3160, 3335, 3511, 3688, 3865, 4040, 4220, 4397, 4574, 4751, 4928, 5103, 5279, 5458, 5634, 5813, 5988, 6164, 6341, 6519, 6697, 6872, 7050, 7226, 7403, 7580, 7757, 7933, 8111, 8287, 8463, 8640, 8818, 8994, 9172, 9350, 9527, 9703, 9879, 10055, 10232, 10408, 10585, 10763, 10941, 11118, 11294, 11470, 11647, 11824, 12002, 12178, 12353, 12533, 12709, 12885, 13060, 13238, 13417, 13594, 13770, 13944]
    hit1 = 6
    data2 = [0, 30610, 33715, 36822, 39927, 43033, 46137, 49242, 52347, 55453, 58559, 61665, 64771, 67877, 70979, 74085, 77190, 80298, 83404, 86509, 89615, 92717, 95824, 98930, 102036, 105141, 108247, 111352, 114457, 117561, 120668, 123773, 126879, 129984, 133090, 136194, 139300, 142406, 145511, 148616, 151722, 154827, 157932, 161037, 164144, 167248, 170354, 173459, 176565, 179669, 182775, 185881, 188987, 192091, 195197, 198303, 201407, 204513, 207619, 210725, 213830, 216936, 220040, 223145, 226250, 229357, 232462, 235568, 238673, 241778, 225018]
    hit2 = 0
    CD = 45
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    MP = [450, 3780]
    无色消耗 = 2

    def 装备护石(self, char):
        self.hit0 = 120
        self.power0 = 1.25
        self.power1 = 1.25
        self.power2 = 1.21

    def 等效百分比(self, **argv):
        char = argv.get('char', {})
        光能 = char.get_skill_by_name("光反应能量模块")
        if 光能.等级 > 0:
            self.hit0 = 0
            self.hit1 = 0
            self.hit2 = 1
        else:
            self.hit0 = 110
            self.hit1 = 6
            self.hit2 = 0
            if '拦截机工厂' in char.护石栏:
                self.hit0 = 120
        return super().等效百分比(**argv)


class 技能14(被动技能):
    名称 = '光反应能量模块'
    所在等级 = 45
    等级上限 = 1
    基础等级 = 1
    关联技能 = ['拦截机工厂']
    倍率 = 1.0

    def 加成倍率(self, 武器类型):
        return self.倍率


class 技能15(被动技能):
    名称 = 'G系扩张'
    所在等级 = 48
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.025+0.02*self.等级, 5)


class 技能16(主动技能):
    名称 = 'G0战争领主'
    所在等级 = 50
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    data0 = [0, 743, 916, 1089, 1261, 1433, 1606, 1779, 1952, 2122, 2296, 2466, 2641, 2813, 2986, 3156, 3330, 3503, 3675, 3849, 4021, 4192, 4363, 4536, 4709, 4883, 5055, 5227, 5400, 5573, 5743, 5916, 6089, 6261, 6433, 6606, 6777, 6952, 7122, 7296, 7466, 7641, 7814, 7986, 8156, 8330, 8503, 8675, 8849, 9021, 9192]
    hit0 = 30
    data1 = [0, 931, 1147, 1361, 1577, 1791, 2007, 2223, 2439, 2653, 2869, 3085, 3301, 3516, 3730, 3946, 4161, 4377, 4594, 4809, 5025, 5241, 5456, 5672, 5887, 6103, 6319, 6533, 6749, 6964, 7180, 7397, 7611, 7827, 8040, 8257, 8473, 8688, 8904, 9120, 9334, 9551, 9766, 9982, 10197, 10411, 10627, 10843, 11059, 11274, 11490]
    hit1 = 24
    data2 = [0, 4027, 4962, 5895, 6829, 7763, 8697, 9631, 10564, 11500, 12432, 13367, 14300, 15236, 16169, 17103, 18037, 18970, 19905, 20840, 21771, 22707, 23639, 24574, 25507, 26442, 27376, 28310, 29244, 30178, 31111, 32046, 32980, 33914, 34847, 35781, 36715, 37649, 38584, 39515, 40452, 41385, 42320, 43251, 44186, 45122, 46054, 46987, 47922, 48854, 49789]
    hit2 = 12
    CD = 145.0
    演出时间 = 7.1

    MP = [400, 1120]
    无色消耗 = 2


class 技能17(主动技能):
    名称 = 'HS12等离子体发生器'
    所在等级 = 60
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [0, 26065, 28708, 31352, 33998, 36642, 39285, 41930, 44574, 47217, 49863, 52507, 55151, 57796, 60438, 63083, 65728, 68371, 71015, 73660, 76305, 78948, 81593, 84237, 86879, 89526, 92170, 94815, 97459, 100101, 102746, 105391, 108034, 110680, 113324, 115967, 118613, 121256, 123900, 126545, 129188, 131832, 134478, 137122, 139765, 142409, 145053, 147698, 150343, 152987, 155630]
    hit0 = 1
    CD = 30
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    MP = [400, 1120]
    无色消耗 = 2

    def 装备护石(self, char):
        self.倍率 *= 1.21


class 技能18(主动技能):
    名称 = 'G4雷行者'
    所在等级 = 70
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [0, 800, 882, 963, 1042, 1123, 1207, 1287, 1368, 1450, 1531, 1612, 1694, 1774, 1855, 1935, 2016, 2099, 2180, 2260, 2343, 2423, 2504, 2586, 2666, 2746, 2828, 2908, 2991, 3073, 3153, 3234, 3316, 3396, 3479, 3558, 3639, 3720, 3801, 3883, 3965, 4045, 4127, 4209, 4289, 4369, 4450, 4531, 4612, 4693, 4776]
    hit0 = 48
    data1 = [0, 1649, 1817, 1985, 2152, 2316, 2487, 2654, 2821, 2986, 3154, 3323, 3489, 3656, 3824, 3991, 4159, 4326, 4494, 4659, 4829, 4995, 5163, 5329, 5498, 5665, 5833, 5999, 6167, 6333, 6502, 6668, 6837, 7001, 7172, 7338, 7505, 7672, 7841, 8006, 8174, 8341, 8509, 8676, 8844, 9011, 9177, 9345, 9515, 9680, 9847]
    hit1 = 3
    CD = 45
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1
    演出时间 = 7.3

    MP = [580, 4500]
    无色消耗 = 2

    def 装备护石(self, char):
        self.倍率 *= 1.2
        self.CDR = 0.9


class 技能19(主动技能):
    名称 = 'GSP猎鹰'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [0, 25504, 28091, 30678, 33265, 35852, 38440, 41027, 43615, 46200, 48788, 51377, 53965, 56552, 59139, 61726, 64314, 66901, 69489, 72075, 74662, 77249, 79837, 82425, 85013, 87599, 90187, 92774, 95361, 97948, 100534, 103122, 105710, 108298, 110886, 113472, 116058, 118647, 121235, 123822, 126408, 128996, 131584, 134171, 136759, 139344, 141931, 144519, 147106, 149694, 152282]
    hit0 = 1
    data1 = [0, 8505, 9366, 10230, 11093, 11954, 12817, 13680, 14544, 15405, 16269, 17132, 17993, 18856, 19719, 20581, 21444, 22308, 23170, 24033, 24895, 25758, 26621, 27483, 28346, 29207, 30072, 30934, 31796, 32660, 33523, 34384, 35247, 36110, 36972, 37836, 38699, 39562, 40423, 41286, 42149, 43012, 43874, 44737, 45602, 46463, 47325, 48188, 49051, 49913, 50776]
    hit1 = 0
    data2 = [0, 1096, 1208, 1320, 1429, 1541, 1651, 1763, 1872, 1985, 2096, 2207, 2319, 2428, 2540, 2651, 2762, 2874, 2984, 3096, 3208, 3317, 3429, 3539, 3653, 3764, 3874, 3985, 4096, 4207, 4319, 4429, 4542, 4651, 4764, 4874, 4985, 5096, 5206, 5318, 5431, 5540, 5652, 5761, 5873, 5985, 6096, 6209, 6318, 6429, 6541]
    hit2 = 0
    CD = 13
    演出时间 = 2
    是否有护石 = 1
    演出时间 = 3

    MP = [239, 1851]
    # 无色消耗 = 3

    形态 = ["G-3", "G-2", "G-1"]

    def 形态变更(self, 形态, char: Character):
        if 形态 == '' and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "G-1":
            self.hit0 = 1
            self.hit1 = 0
            self.hit2 = 0
        if 形态 == "G-2":
            self.hit0 = 0
            self.hit1 = 3
            self.hit2 = 0
        if 形态 == "G-3":
            self.hit0 = 0
            self.hit1 = 0
            self.hit2 = 25

    def 装备护石(self, char):
        self.power0 = 1.35
        self.power1 = 1.34
        self.power2 = (15/25)*2.19  # hit2降低为15
        self.CDR = 0.9


class 技能20(被动技能):
    名称 = 'GX主宰者'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    冷却关联技能 = ['所有']
    非冷却关联技能 = ['G0战争领主', '终结者：博尔特MX', 'G-X星尘天穹', 'RX-78追击者']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        if self.等级 in [1, 2]:
            return round(1.08+0.02*self.等级, 5)
        if self.等级 == 3:
            return round(1.15, 5)
        if self.等级 == 4:
            return round(1.20, 5)
        if self.等级 >= 5:
            return round(1.12+0.02*self.等级, 5)

    def CD缩减倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return 0.85


class 技能21(主动技能):
    名称 = '高压电磁场'
    所在等级 = 80
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [0, 6083, 6701, 7317, 7933, 8549, 9169, 9787, 10402, 11021, 11636, 12255, 12869, 13487, 14106, 14722, 15339, 15956, 16573, 17192, 17806, 18424, 19040, 19659, 20277, 20892, 21510, 22129, 22743, 23361, 23977, 24596, 25214, 25829, 26447, 27063, 27680, 28298, 28913, 29532, 30149, 30767, 31383, 31999, 32617, 33236, 33850, 34469, 35084, 35704, 36319]
    hit0 = 15
    CD = 50
    演出时间 = 3.5
    是否有护石 = 1

    MP = [1038, 7785]
    无色消耗 = 5

    def 装备护石(self, char):
        self.倍率 *= 1.31
        self.CDR *= 0.9


class 技能22(主动技能):
    名称 = '终结者：博尔特MX'
    所在等级 = 85
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    data0 = [0, 2594, 3194, 3798, 4398, 5000, 5601, 6202, 6803, 7404, 8008, 8608, 9210, 9810, 10413, 11013, 11615, 12216, 12817, 13420, 14020, 14624, 15223, 15825, 16426, 17028, 17630, 18229, 18832, 19433, 20035, 20636, 21238, 21839, 22441, 23042, 23644, 24245, 24847, 25447, 26047, 26651, 27252, 27854, 28454, 29055, 29657, 30259, 30861, 31461, 32063]
    hit0 = 8
    data1 = [0, 5658, 6973, 8282, 9595, 10908, 12220, 13533, 14844, 16156, 17468, 18781, 20096, 21404, 22716, 24030, 25341, 26653, 27965, 29278, 30590, 31904, 33214, 34525, 35839, 37151, 38464, 39774, 41087, 42399, 43713, 45026, 46335, 47648, 48960, 50273, 51584, 52897, 54208, 55521, 56834, 58144, 59456, 60770, 62082, 63394, 64705, 66018, 67330, 68643, 69957]
    hit1 = 2
    data2 = [0, 3313, 4080, 4850, 5616, 6384, 7151, 7922, 8694, 9464, 10230, 10998, 11765, 12536, 13300, 14070, 14838, 15606, 16376, 17143, 17913, 18677, 19447, 20214, 20983, 21750, 22519, 23291, 24058, 24827, 25597, 26364, 27134, 27900, 28669, 29435, 30205, 30970, 31740, 32507, 33275, 34044, 34813, 35583, 36348, 37117, 37888, 38656, 39427, 40193, 40962]
    hit2 = 15
    data3 = [0, 4088, 5036, 5983, 6930, 7878, 8827, 9774, 10722, 11669, 12615, 13565, 14512, 15461, 16407, 17356, 18302, 19250, 20198, 21146, 22093, 23041, 23990, 24937, 25884, 26832, 27779, 28727, 29675, 30623, 31569, 32518, 33465, 34414, 35361, 36310, 37255, 38202, 39151, 40100, 41047, 41995, 42941, 43888, 44837, 45786, 46732, 47680, 48627, 49573, 50523]
    hit3 = 6
    data4 = [0, 41497, 51119, 60743, 70364, 79987, 89609, 99232, 108855, 118477, 128100, 137722, 147346, 156967, 166591, 176213, 185836, 195457, 205082, 214702, 224325, 233949, 243569, 253193, 262815, 272438, 282059, 291684, 301304, 310928, 320551, 330172, 339795, 349417, 359040, 368661, 378286, 387906, 397530, 407153, 416776, 426397, 436020, 445642, 455264, 464888, 474508, 484132, 493755, 503377, 512999]
    hit4 = 1
    data5 = [0, 41497, 51119, 60743, 70364, 79987, 89609, 99232, 108855, 118477, 128100, 137722, 147346, 156967, 166591, 176213, 185836, 195457, 205082, 214702, 224325, 233949, 243569, 253193, 262815, 272438, 282059, 291684, 301304, 310928, 320551, 330172, 339795, 349417, 359040, 368661, 378286, 387906, 397530, 407153, 416776, 426397, 436020, 445642, 455264, 464888, 474508, 484132, 493755, 503377, 512999]
    hit5 = 1
    CD = 180

    MP = [2500, 8000]
    无色消耗 = 10


class 技能23(主动技能):
    名称 = '超时空光耀加农炮'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [0, 8077, 8895, 9716, 10535, 11355, 12173, 12994, 13812, 14631, 15452, 16270, 17089, 17909, 18727, 19547, 20366, 21186, 22004, 22826, 23644, 24465, 25283, 26102, 26922, 27741, 28559, 29380, 30199, 31018, 31836, 32657, 33475, 34296, 35114, 35935, 36754, 37574, 38392, 39212, 40030, 26523, 27055, 27587, 28119, 28654, 29183, 29716, 30247, 30780, 31311]
    hit0 = 6
    data1 = [0, 28267, 31135, 34002, 36870, 39737, 42606, 45474, 48341, 51209, 54075, 56944, 59811, 62679, 65546, 68414, 71282, 74150, 77017, 79885, 82752, 85621, 88489, 91355, 94222, 97090, 99959, 102826, 105693, 108561, 111430, 114296, 117165, 120032, 122901, 125767, 128635, 131502, 134371, 137237, 140105, 142972, 145842, 148708, 151576, 154443, 157312, 160178, 163047, 165913, 168782]
    hit1 = 4
    CD = 60

    MP = [833, 2667]
    无色消耗 = 7


class 技能24(被动技能):
    名称 = '微型制导'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18 + 0.02 * self.等级, 5)


class 技能25(主动技能):
    名称 = 'G-X星尘天穹'
    所在等级 = 100
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    data0 = [0, 22454, 27662, 32868, 38076, 43282, 48489, 53696, 58902, 64109, 69316, 74522, 79730, 84936, 90144, 95349, 100556, 105763, 110970, 116177, 121384, 126590, 131797, 137003, 142211, 147417, 152625, 157831, 163038, 168244, 173451, 178658, 183865, 189071, 194279, 199485, 204693, 209898, 215104, 220312, 225518, 230726, 235933, 241138, 246345, 251552, 256759, 261966, 267174, 272380, 277585]
    hit0 = 8
    data1 = [0, 59879, 73764, 87648, 101533, 115418, 129302, 143187, 157070, 170956, 184842, 198726, 212612, 226496, 240379, 254264, 268149, 282033, 295918, 309803, 323687, 337572, 351457, 365342, 379227, 393111, 406996, 420881, 434765, 448649, 462535, 476419, 490304, 504190, 518074, 531959, 545843, 559728, 573613, 587497, 601382, 615267, 629151, 643035, 656922, 670806, 684691, 698576, 712460, 726345, 740230]
    hit1 = 7
    CD = 290
    演出时间 = 6.5

    MP = [4028, 12889]
    无色消耗 = 15


class classChange(Character):
    def __init__(self, equVersion=""):
        self.实际名称 = 'mechanic_female'
        self.名称 = '重霄·机械师'
        self.角色 = '神枪手(女)'

        self.职业 = '机械师'
        # 用来筛CP武器的
        self.转职 = '机械师(女)'
        self.武器选项 = ['自动手枪']
        self.输出类型选项 = ['魔法百分比']
        self.防具精通属性 = ['智力']
        self.类型 = '魔法百分比'
        self.武器类型 = '自动手枪'
        self.防具类型 = '布甲'
        技能列表 = []
        技能序号 = {}
        i = 0
        while i >= 0:
            try:
                tem = eval('技能'+str(i)+'()')
                tem.基础等级计算()
                技能序号[tem.名称] = i
                技能列表.append(tem)
                i += 1
            except:
                i = -1
        self.技能栏 = 技能列表
        self.技能序号 = 技能序号
        self.buff = 1.85

        super().__init__(equVersion)

    def set_individuation(self, info):
        info['char_optiopns'] = [
            {
                "name": " [G1科罗纳] ",
                "option": ["单次输出 {} 秒".format(str(i)) for i in range(1, 61)]
            },
            {
                "name": " [G2旋雷者] ",
                "option": ["单次输出 {} 秒".format(str(i)) for i in range(1, 61)]
            }, {
                "name": " [G3捕食者] ",
                "option": ["单次输出 {} 秒".format(str(i)) for i in range(1, 61)]
            }, {
                "name": " [空战机械：狂风] ",
                "option": ["单次输出 {} 秒".format(str(i)) for i in range(1, 61)]
            }
        ]

    def 职业特殊设置(self):
        G1 = self.get_skill_by_name("G1科罗纳")
        G2 = self.get_skill_by_name("G2旋雷者")
        G3 = self.get_skill_by_name("G3捕食者")
        G1磁力弹 = self.get_skill_by_name("G1磁力弹")
        G1.输出时间 = self.get_individuation(0) + 1
        G2.输出时间 = self.get_individuation(1) + 1
        G3.输出时间 = self.get_individuation(2) + 1
        self.get_skill_by_name("空战机械：狂风").输出时间 = self.get_individuation(3) + 1
        G2.TP上限 = G1.TP上限
        G2.TP成长 = G1.TP成长
        G2.TP等级 = G1.TP等级
        G3.TP上限 = G1.TP上限
        G3.TP成长 = G1.TP成长
        G3.TP等级 = G1.TP等级
        G1磁力弹.TP上限 = G1.TP上限
        G1磁力弹.TP成长 = G1.TP成长
        G1磁力弹.TP等级 = G1.TP等级
        G1磁力弹.等级 = G1.等级
        G1磁力弹.等级上限 = G1.等级上限